package com.film.cinema.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.film.common.core.domain.entity.SysDept;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.film.common.annotation.Excel;
import com.film.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 员工管理对象 emp
 * 
 * *@author fy
 * @date 2025-02-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Emp extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 员工id */
    private Long empId;

    /** 员工姓名 */
    @Excel(name = "员工姓名")
    private String empName;

    /** 员工工号 */
    @Excel(name = "员工工号")
    private String empNumber;

    /** 部门名称 */
    @Excel(name = "部门id")
    private Integer deptId;

    /** 职位 */
    @Excel(name = "职位")
    private String empCareer;

    /** 员工性别 */
    @Excel(name = "员工性别")
    private String empSex;

    /** 员工电话 */
    @Excel(name = "员工电话")
    private String empPhone;

    /** 员工头像 */
    @Excel(name = "员工头像")
    private String empImage;

    /**创建时间*/
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;  // 创建时间,用Date日期类型
    /** 更新时间 */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatetime;  // 修改时间,用Date日期类型

    /** 备注 */
    @Excel(name = "备注")
    private String empNotes;
    /** 部门 */
    private SysDept dept;
    public SysDept getDept() {
        return dept;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("empId", getEmpId())
            .append("empName", getEmpName())
            .append("empNumber", getEmpNumber())
            .append("deptId", getDeptId())
            .append("empCareer", getEmpCareer())
            .append("empSex", getEmpSex())
            .append("empPhone", getEmpPhone())
            .append("empImage", getEmpImage())
            .append("createtime", getCreatetime())
            .append("updatetime", getUpdatetime())
            .append("empNotes", getEmpNotes())
            .toString();
    }
}
